import request from '@/utils/request'

export function getUserInfo() {
	return request.get('user/info')
}

export function logout() {
	return request.get('user/info')
}
export function getMobileNumber(data : AnyObject){
	return request.post('auth/getMobileNumber', data)
}
export function getPhoneSmsCode(data : AnyObject) {
    return request.post('user/get_sms_code', data)
}
export function miniAppLogin(data : AnyObject){
	return request.post('auth/miniAppLogin', data)
}
export function mobileauth(data : AnyObject){
	return request.post('auth/mobileauth', data)
}
export function uploadBase64Image(data : AnyObject) {
    return request.post('user/base64image', data)
}

export function saveUserHeadImage(data : AnyObject) {
    return request.post('user/save_head_img', data)
}

export function saveUserNickname(data : AnyObject) {
    return request.post('user/save_nickname', data)
}

//发送旧验证码
export function sendOldPhoneCode(data : AnyObject) {
    return request.post('user/send_old_phone_code', data)
}

//验证旧手机验证码
export function checkOldPhoneCode(data : AnyObject) {
    return request.post('user/check_old_phone_code', data)
}

//发送新手机
export function sendNewPhoneCode(data : AnyObject) {
    return request.post('user/send_new_phone_code', data)
}

//最终提交修改手机号
export function submitEditPhone(data : AnyObject) {
    return request.post('user/check_submit_phone', data)
}

//修改密码
export function editPassword(data : AnyObject) {
    return request.post('user/edit_password', data)
}